<template>
    <div class="immobilization">
        <div class="move_right_box" ref="move_right_box">
            <div class="move_right_box_content">
                <el-tabs v-model.trim="activeName">
                    <el-tab-pane name="description">
                        <div slot="label" style="font-size: 16px;">
                            <span>图表说明</span>
                        </div>
                        <img :src="option.description" width="100%" />
                    </el-tab-pane>

                    <el-tab-pane name="uploadInfo">
                        <div slot="label" style="font-size: 16px;">
                            <span>文件上传</span>
                        </div>
                        <upload v-on="$listeners" v-bind="$attrs" @startDraw="startDraw" />
                    </el-tab-pane>

                    <el-tab-pane name="chartInfo" :disabled="activeName !== 'chartInfo'">
                        <div slot="label" style="font-size: 16px;">
                            <span>图表调整</span>
                        </div>
                        <chart v-on="$listeners" v-bind="$attrs" :option="option" />
                    </el-tab-pane>
                    <el-tab-pane name="specification">
                        <div slot="label" style="font-size: 16px;">
                            <span>说明书</span>
                        </div>
                        <img :src="option.specification" width="100%" />
                    </el-tab-pane>
                </el-tabs>

            </div>
        </div>
    </div>
</template>

<script>
import upload from './upload.vue'
import chart from './chart.vue'
export default {
    name: 'GenescloudUiDetails',
    components: {
        upload,chart
    },
    props: {
        option: {
            type: Object,
            default: () => { }
        }
    },
    data() {
        return {
            activeName: 'uploadInfo'
        };
    },

    mounted() {

    },

    methods: {
        startDraw() {
            this.activeName = 'chartInfo'
        }
    },
};
</script>

<style lang="scss" scoped>
.immobilization {
    height: calc(100vh - 160px);
}
</style>